<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>H5测试</title>
</head>
<body>
    <div style="padding-top: 20px">test test test test test test test test</div>
    <h1>我的h5测试首页</h1>
    <a href="./doc/test.html" style="color:blue;font-size: 30px;line-height: 150px;">点击跳转</a><br/>
    <a href="./doc/test.pdf" style="line-height: 30px;font-size: 20px;">pdf</a><br/>
    <a href="./doc/test.xlsx" style="line-height: 30px;font-size: 20px;">xlsx</a><br/>
    <a href="./doc/test.docx" style="line-height: 30px;font-size: 20px;">docx</a><br/>
    <a href="./doc/test.pptx" style="line-height: 30px;font-size: 20px;">pptx</a><br/>
    <a href="./doc/test.rtf" style="line-height: 30px;font-size: 20px;">rtf</a><br/>
    <a href="./doc/test.txt" style="line-height: 30px;font-size: 20px;">txt</a><br/>
    <a href="https://iiwpp-est-pare-stg2.pingan.com.cn/iiwpp/est-app/app/document/onlinePreviewFile/word测试文件.docx/8e6c133758ec46bd8c661ec41431ba1e/204137">线上</a>
    <div id="close">点击关闭页面</div>
    <div id="pdf">点击打开PDF</div>
    <div id="xlsx">点击打开xlsx</div>
    <div id="docx">点击打开docx</div>
    <div id="pptx">点击打开pptx</div>
    <div id="rtf">点击打开rtf</div>
    <div id="txt">点击打开txt</div>
    <div id="jpg">点击打开jpg</div>
    <div id="zip">点击打开zip</div>
    <!-- <iframe src="http://172.16.94.69:8080/doc/test.pptx"></iframe> -->
    <!-- <div style="position: fixed;bottom:0;height: 50px;background-color: blue;">666</div> -->
</body>
<script>
    window.fromPaicApp = function (info,back ){
        console.log('window-------',JSON.stringify(info) ,back)
        // alert('999'+JSON.stringify(info))
        // window.postMessage(JSON.stringify({type:'water',data:'close'}));
    }
    document.getElementById("close").addEventListener('click',function(){
        console.log('uuuuuuuuuiiii----')
        // alert('999')
        window.postMessage(JSON.stringify({type:'nav_close'}));
    }, false);
    document.getElementById("pdf").addEventListener('click',function(){
        console.log('uuuuuuuuuiiii----')
        window.postMessage(JSON.stringify({type:'open_pdf',uri:'https://20190501.oss-cn-shanghai.aliyuncs.com/lijie/txt/h5test/doc/test.pdf'}));
    }, false);
    document.getElementById("xlsx").addEventListener('click',function(){
        // https://20190501.oss-cn-shanghai.aliyuncs.com/lijie/txt/h5test
        console.log('uuuuuuuuuiiii----')
        window.postMessage(JSON.stringify({type:'open_pdf',uri:'https://20190501.oss-cn-shanghai.aliyuncs.com/lijie/txt/h5test/doc/test.xlsx'}));
    }, false);
    document.getElementById("docx").addEventListener('click',function(){
        console.log('uuuuuuuuuiiii----')
        window.postMessage(JSON.stringify({type:'open_pdf',uri:'https://20190501.oss-cn-shanghai.aliyuncs.com/lijie/txt/h5test/doc/test.docx'}));
    }, false);
    document.getElementById("pptx").addEventListener('click',function(){
        console.log('uuuuuuuuuiiii----')
        window.postMessage(JSON.stringify({type:'open_pdf',uri:'https://20190501.oss-cn-shanghai.aliyuncs.com/lijie/txt/h5test/doc/test.pptx'}));
    }, false);
    document.getElementById("rtf").addEventListener('click',function(){
        console.log('uuuuuuuuuiiii----')
        window.postMessage(JSON.stringify({type:'open_pdf',uri:'https://20190501.oss-cn-shanghai.aliyuncs.com/lijie/txt/h5test/doc/test.rtf'}));
    }, false);
    document.getElementById("txt").addEventListener('click',function(){
        console.log('uuuuuuuuuiiii----')
        window.postMessage(JSON.stringify({type:'open_pdf',uri:'https://20190501.oss-cn-shanghai.aliyuncs.com/lijie/txt/h5test/doc/test.txt'}));
    }, false);
    document.getElementById("jpg").addEventListener('click',function(){
        console.log('uuuuuuuuuiiii----')
        window.postMessage(JSON.stringify({type:'open_pdf',uri:'https://20190501.oss-cn-shanghai.aliyuncs.com/lijie/txt/h5test/doc/test.jpg'}));
    }, false);
    document.getElementById("zip").addEventListener('click',function(){
        console.log('uuuuuuuuuiiii----')
        window.postMessage(JSON.stringify({type:'open_pdf',uri:'https://20190501.oss-cn-shanghai.aliyuncs.com/lijie/txt/h5test/doc/test.zip'}));
    }, false);

</script>
</html>